<!DOCTYPE html>
<html id="ng-app">
<head lang="zh">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=8">
    <link rel="stylesheet" type="text/css" href="<?=base_url()?>css/tpshop.css"/>
    <title>联通大数据交易集市</title>
    <meta name="keywords" content="抓手数据|大数据交易|大数据|数据包|生态圈|数据包集市|API集市|报告集市"/>
    <meta name="description" content="抓手数据平台是一个全网系大数据交易平台，是独立同时支持个人和机构用户的综合实时在线交易系统，旨在促进数据流通、公正、有公信力、创新型的第三方数据交易平台，平台提供数据出售、数据购买、数据提供商查询以及数据需求发布等模块综合配套服务。"/>
    <link href="<?=base_url()?>css/common.min.css" rel="stylesheet" type="text/css"/>
    <link rel="stylesheet" href="<?=base_url()?>css/jh.css">
    <script src="<?=base_url()?>js/jquery-1.11.3.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="<?=base_url()?>js/global.js"></script>
    <script src="<?=base_url()?>js/pc_common.js"></script>
    <script src="<?=base_url()?>js/layer.js"></script>
    <link rel="icon" href="<?=base_url()?>images/favicon.ico"/>
    <style>
        .ng-scope {
            background: #fff;
        }

        .radio {
            display: none;
        }
    </style>
</head>
<body class="ng-scope">
<!-- 头部顶栏 start [[-->
<div class="top-hander p">
    <div class="w1224 pr">
        <div class="fl">
            <a href="<?=base_url()?>index.php/home/datahub/index">返回平台首页</a>
        </div>
        <!-- <div class="top-ri-header fr">
            <ul>
                <li class="spacer"></li>
                <li class="hover-ba-navdh">
                    <div class="nav-dh">
                        <span>客户服务</span>
                        <i class="jt-x"></i>
                        <div class="conta-hv-nav">
                            <ul>
                                <li><a href="/Seller-Admin-login.html">商家后台</a></li>
                                <li><a href="/Home-Newjoin-index.html" target="_blank">商家入驻</a></li>
                            </ul>
                        </div>
                    </div>
                </li>
            </ul>
        </div> -->
        <div class="fr">
            <?php if(empty($_SESSION['username'])):?>
            <div class="ls-dlzc fl nologin">
                <a href="/Home-user-login.html">Hi,请登录</a>
                <a class="red" href="/Home-user-reg.html">免费注册</a>
            </div>
            <?php else:?>
            <div class="ls-dlzc fl islogin">
                <a class="red userinfo" href="/Home-user-index.html">13021126922</a>
                <a href="/Home-user-logout.html">退出</a>
            </div>
            <?php endif;?>
            <div class="fl spc" style="margin-top:10px"></div>
            <div class="sendaddress pr fl">
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
//用户登录或为登录状态显示
function user_login_or_no()
{
	var uname = getCookie('uname');
	var head_pic = getCookie('head_pic');
	if (uname == '') {
		$('.islogin').remove();
		$('.nologin').show();
	} else {
		$('.nologin').remove();
		$('.islogin').show();
		$('.userinfo').html(decodeURIComponent(uname));
	}
}

$(document).ready(function(){
	user_login_or_no();
});
</script>
<!-- 头部顶栏 end ]]-->
<div class="fn-cart-clearing">
    <div class="wrapper1190" my-cart="">
        <!-- cart-title -->
        <div class="order-header">
            <div class="layout after">
                <div class="fl">
                    <div class="logo pa-to-36 wi345">
                        <a href="/"><img src="<?=base_url()?>photos/logo3.png"></a>
                        <span class="buy_title">购买</span>
                    </div>
                </div>
            </div>
        </div>
        <div class="progress-area area1">
            <ul>
                <li>确认信息</li>
                <li>支付购买</li>
                <li>完成支付</li>
            </ul>
        </div>
        <div class="w1224">
            <p class="remind">提醒：订单暂不支持退款，请确认相关数据信息后提交订单。</p>
        </div>
        <p class="head_title">
            填写并核对订单信息
        </p>
        <!-- end cart-title -->
        <div class="ui_tab">
            <!-- ngIf: !status.overseasEmpty -->
            <div class="ui_tab_content">
                <div class="clearing-c cart-content">
                    <div class="layout after-ta">
                        <div class="sc-list">
                            <form name="cart_form" id="cart_form" action="/home-Virtual-buy_step.html" method="post">
                                <div id="ajax_return">
                                    <div class="sc-pro-list">
                                        <p class="d_info">数据信息</p>
                                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                            <tr class="ba-co-danhui">
                                                <th align="center" valign="middle" width="224px">数据信息</th>
                                                <th align="center" valign="middle" width="178px">规格</th>
                                                <th align="center" valign="middle" width="206px">购买数量</th>
                                                <th align="center" valign="middle" width="170px">单价</th>
                                                <th align="center" valign="middle" width="170px">可调用量</th>
                                                <th align="center" valign="middle" width="170px">小计</th>
                                                <th align="center" valign="middle" width="106px">操作</th>
                                            </tr>
                                            <tr>
                                                <td align="center" valign="middle" width="224px">
                                                    <?php echo $data['data_name']?></td>
                                                <td align="center" valign="middle" width="178px">
                                                    1次/￥<?php echo $data['data_price']?></td>
                                                <td align="center" valign="middle" width="206px">
                                                    <div class="sc-stock-area">
                                                        <div class="stock-area">
                                                            <a onClick="switch_num(-1,9999);" title="减">-</a>
                                                            <input class="wi43 fl" type="text"
                                                                   value="<?php echo $num?>" name="goods_num"
                                                                   id="goods_num" readonly=""/>
                                                            <a onClick="switch_num(1,9999);"
                                                               title="加">+</a>
                                                            <input type="hidden" name="goods_id"
                                                                   value="48">
                                                            <input type="hidden" name="virtual_limit"
                                                                   value="9999">
                                                            <input type="hidden" name="goods_spec_key"
                                                                   value="">
                                                        </div>
                                                    </div>
                                                </td>
                                                <td align="center" valign="middle">
                                                    <span id="shop_price" rel="<?php echo $data['data_price']?>">￥<?php echo $data['data_price']?></span>
                                                </td> 
                                                <td align="center" valign="middle" width="170px">
                                                    1次
                                                </td>
                                                <td align="center" valign="middle" class="goodsfee" width="170px">
                                                    ￥<?php echo $data['data_price']?> 
                                                </td>
                                                <td align="center" valign="middle" width="106px">
                                                    <a class="gwc-gb" href="javascript:void(0);"
                                                       onclick="javascript:history.go(-1);">删除</a>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </div>
                                <div class="pay_way">
                                    <p>选择支付方式</p>
                                    <ul style="height: 100px;">
                                        <li class="aliPay pay_act" onClick="change_pay('alipay')">
                                            <input type="radio" id="input-ALIPAY-1" value="pay_code="
                                                   class="radio vam" name="pay_radio">
                                            <label for="">
                                                <em><img style="width:80px;height:80px" src="<?=base_url()?>images/alipay.jpg" alt="支付宝支付"></em><span>支付宝支付</span>
                                            </label>
                                        </li>
                                        <!-- <li class="WeChat"><em><img style="width:80px;height:80px" src="<?=base_url()?>images/weixin.jpg" alt="微信支付"></em><span>微信支付</span></li> -->
                                        <li class="WeChat" onClick="change_pay('weixinpay')">
                                            <input type="radio" name="pay_radio" class="radio vam"
                                                   value="pay_code=&bank_code=" id="input-ALIPAY-1">
                                            <label for="">
                                                <em><img style="width:110px;height:80px" src="<?=base_url()?>images/weixin.jpg"
                                                         alt="微信支付"></em><span>微信支付</span>
                                            </label>
                                        </li>
                                        <li class="AccountPay" onClick="change_pay('accountpay')">
                                            <input type="radio" name="pay_radio" class="radio vam"
                                                   value="pay_code=&bank_code=" id="input-ALIPAY-1">
                                            <label for="">
                                                <em><img style="width:80px;height:80px" src="<?=base_url()?>images/balance.jpg"
                                                         alt="余额支付"></em><span>账户余额支付</span>
                                            </label>
                                        </li>
                                        <li class="UnionPay" onClick="change_pay('unionpay')">
                                            <input type="radio" name="pay_radio" class="radio vam"
                                                   value="pay_code=&bank_code=" id="input-ALIPAY-1">
                                            <label for="">
                                                <em><img style="width:80px;height:80px" src="<?=base_url()?>images/UnionPay.jpg"
                                                         alt="银联支付"></em><span>银联支付</span>
                                            </label>
                                        </li>
                                    </ul>
                                </div>
                                <style>
                                    .pay_way ul li img {
                                        margin-top : 0px;
                                        margin-left: -100px;
                                    }
                                </style>
                                <script>
                                    $(".pay_way ul li").click(function () {
                                        $(this).addClass('pay_act').siblings().removeClass('pay_act');
                                    });

                                    function change_pay(type){
                                        $("#paytype").val(type);
                                    }
                                </script>
                                <div class="sc-acti-list" style="margin-top: 50px;">
                                    <div class="virtual_order">订单总金额：<span style="margin-right:20px">
                            		<b style="font-family: tahoma;color: #f22e00;font-weight: 700;" class="goodsfee">￥97元</b></span>
                                    </div>
                                    <!-- <a class="gwc-qjs" href="javascript:void(0)" onClick="$('#cart4_form').submit();" style="cursor: not-allowed;">确认订单</a> -->
                                    <!-- <a class="gwc-qjs" href="javascript:void(0)" onClick="$('#cart4_form').submit();">确认订单</a> -->
                                    <!-- <a class="gwc-qjs" href="<?=base_url()?>index.php/home/gopay/alipay" target="_blank" id="surePay">确认订单</a> -->
                                    <a class="gwc-qjs" onclick="surePay()">确认订单</a>
                                </div>
                                <input type="hidden" name="paytype" value="alipay" id="paytype"/>
                                <div id="hiddenPay"></div>
                            </form>
                            <script>
                                /*$(document).ready(function () {
                                    $("input[name='pay_radio']").first().trigger('click');
                                });*/
                                function surePay(){
                                    var type = $("#paytype").val();
                                    var ordername = "<?php echo $data['data_name']?>";
                                    var dataId = "<?php echo $data['id']?>";
                                    var goods_num = $("#goods_num").val();
                                    var unitPrice = "<?php echo $data['data_price']?>";
                                    $.post('chooseType',
                                            {ordername:ordername,dataId:dataId,goodsNum:goods_num,paytype:type,unitPrice:unitPrice},
                                            function(result){
                                              
                                                if(type == "alipay"){
                                                    $("#hiddenPay").html(result); 
                                                    $("#alipaysubmit").attr('target','_blank');
                                                    document.forms['alipaysubmit'].submit();
                                                } else if(type == "accountpay"){
                                                    alert(result);
                                                    if(result=="余额支付成功"){
                                                        window.location.href = "<?=base_url()?>index.php/home/userinfo/orderinfo/index";
                                                    }
                                                }
                                              
                                            }    
                                    );

                                }
                            </script>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--footer-s-->
    <div class="goContact">
    <img src="<?=base_url()?>images/contact.png" alt="客服">
</div>
<div class="contact_type">
    <div class="right-contact-us">
        <span class="phone">010-65916788</span>
    </div>
</div>
<div class="goTop">
    <img src="<?=base_url()?>images/goTop.png" alt="返回顶部">
</div>
<script>
    var min_height = $(window).height();
    $(window).scroll(function () {
        var s = $(window).scrollTop();
        if (s > min_height) {
            $(".goTop").show();
        } else {
            $(".goTop").hide();
        }
        ;
    });
    $(".goTop").mouseenter(function () {
        $(this).find("img").attr("src", "/template/pc/rainbow/static/images/goTop_w.png");
        $(".goTop").click(function () {
            $("html,body").animate({scrollTop: 0}, 500);
        });
        $(".goTop").mouseleave(function () {
            $(this).find("img").attr("src", "/template/pc/rainbow/static/images/goTop.png");
        });
    });
    $(".goContact").mouseenter(function () {
        $(".contact_type").animate({width: "135px"}, 100);
        $(this).find("img").attr("src", "/template/pc/rainbow/static/images/contact_w.png");
        $(".goContact").mouseleave(function () {
            $(".contact_type").animate({width: "0px"}, 100);
            $(this).find("img").attr("src", "/template/pc/rainbow/static/images/contact.png");
        });
    });
</script>
<div class="footer p mb0">
    <div class="w1224">
        <div class="footer-ewmcode">
            <div class="foot-list-fl">

                <div class="foot-list-wrap p">
                    <ul>
                        <li class="foot-th">
                            关于我们
                        </li>
                        <a href="/about.html">
                            <li>公司简介</li>
                        </a>
                        <a href="/about.html">
                            <li>交易平台</li>
                        </a>
                        <a href="/about.html">
                            <li>媒体板块</li>
                        </a>
                        <a href="/about.html">
                            <li>共治平台</li>
                        </a>
                        <a href="javascript:;">
                            <li>招贤纳士</li>
                        </a>
                        <a href="javascript:;">
                            <li>合作伙伴</li>
                        </a>
                        <a href="javascript:;">
                            <li>相关业务</li>
                        </a>
                    </ul>
                    <ul>
                        <li class="foot-th">
                            商务合作
                        </li>
                        <a href="javascript:;">
                            <li>资源合作</li>
                        </a>
                        <a href="javascript:;">
                            <li>广告合作</li>
                        </a>
                        <a href="javascript:;">
                            <li>数据源合作</li>
                        </a>
                        <a href="/report.html">
                            <li>报告集市</li>
                        </a>
                        <a href="/packet.html">
                            <li>数据包</li>
                        </a>
                    </ul>
                    <ul>
                        <li class="foot-th">
                            供应商&帮助
                        </li>
                        <a href="/Home-Newjoin-index.html">
                            <li>入驻流程</li>
                        </a>
                        <a href="javascript:;">
                            <li>数据录入</li>
                        </a>
                        <a href="javascript:;">
                            <li>购物流程</li>
                        </a>
                        <a href="javascript:;">
                            <li>支付流程</li>
                        </a>
                    </ul>
                    <ul>
                        <li class="foot-th">
                            服务&支持
                        </li>
                        <a href="javascript:;">
                            <li>买家指南</li>
                        </a>
                        <a href="javascript:;">
                            <li>入驻指南</li>
                        </a>
                        <a href="javascript:;">
                            <li>常见问题</li>
                        </a>
                        <a href="javascript:;">
                            <li>隐私政策</li>
                        </a>
                    </ul>
                    <ul>
                        <li class="foot-th">
                            用户中心
                        </li>
                        <a href="/Home-User-index.html">
                            <li>用户认证</li>
                        </a>
                        <a href="/Home-User-index.html">
                            <li>用户服务</li>
                        </a>
                        <a href="javascript:;">
                            <li>使用手册</li>
                        </a>
                    </ul>
                    <ul>
                        <li class="foot-th">
                            联系我们
                        </li>
                        <a href="javascript:;">
                            <li>联系方式</li>
                        </a>
                        <a href="javascript:;">
                            <li>友情链接</li>
                        </a>
                        <li>微信公众号</li>
                        <li><img src="<?=base_url()?>images/ewm.png" alt="微信公众号"></li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="mod_copyright p">
            <p>Copyright&nbsp;&nbsp;&copy;&nbsp;&nbsp;2017-2019&nbsp;&nbsp;中青联盟大数据交易平台&nbsp;&nbsp;版权所有&nbsp;&nbsp;保留一切权利&nbsp;&nbsp;<a
                    href="http://www.miibeian.gov.cn" target="_blank">京ICP备17015265号-2</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i
                    class="copyright_ico copyright_ico_1"></i>&nbsp;&nbsp;<a href=""
                                                                             target="_blank">京公网安备00000000000000号</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i
                    class="copyright_ico copyright_ico_2"></i>
            </p>
            <p class="mod_copyright_auth">
                <a class="mod_copyright_auth_ico mod_copyright_auth_ico_1" href="javascript:;"
                   target="_blank">经营性网站备案中心</a>
                <a class="mod_copyright_auth_ico mod_copyright_auth_ico_2" href="javascript:;"
                   target="_blank">可信网站信用评估</a>
                <a class="mod_copyright_auth_ico mod_copyright_auth_ico_3" href="javascript:;"
                   target="_blank">网络警察提醒你</a>
                <a class="mod_copyright_auth_ico mod_copyright_auth_ico_4" href="javascript:;" target="_blank">诚信网站</a>
                <a class="mod_copyright_auth_ico mod_copyright_auth_ico_5" href="javascript:;"
                   target="_blank">中国互联网举报中心</a>
                <a class="mod_copyright_auth_ico mod_copyright_auth_ico_6"
                   href="https://www.yunaq.com/report/v3/login/?site=www.zhuashou.net" target="_blank">知道创宇云安全</a>
            </p>
        </div>
    </div>
</div>
<!-- footer置底 -->
<script>
    var footerT = min_height - 346;
    var bodyH = $("body").height();
    if (bodyH <= min_height) {
        $(".footer").css({
            position: 'absolute',
            top: footerT + 'px',
            bottom: 0,
            left: 0,
            right: 0
        });
    }
</script>

    <!--footer-e-->
    <script>

        /**
        *  页面加载后，自动调整价格信息
        *
        **/
        $(document).ready(function(){ 
　　　　    var num2 = parseInt($("input[name='goods_num']").val());
            var shop_price = $('#shop_price').attr('rel');
            $("input[name='goods_num']").val(num2);
            $('.goodsfee').html("￥" + (num2 * shop_price).toFixed(2) + "元");
        }); 

        /**
         * 购买商品数量加加减减
         * 购买数量 , 购物车id , 库存数量
         */
        function switch_num(num, store_count) {
            var num2 = parseInt($("input[name='goods_num']").val());
            var shop_price = $('#shop_price').attr('rel');
            var virtual_limit = parseInt($("input[name='virtual_limit']").val());
            num2 += num;
            if (num2 < 1) num2 = 1; // 保证购买数量不能少于 1
            if (num2 > store_count) {
                layer.alert("库存只有 " + store_count + " 件, 你只能买 " + store_count + " 件", {icon: 2});
                num2 = store_count; // 保证购买数量不能多余库存数量
            }
            if (num2 > virtual_limit) {
                layer.alert("此商品限制只能购买 " + virtual_limit + " 件, 你只能买 " + virtual_limit + " 件", {icon: 2});
                num2 = virtual_limit; // 保证购买数量不能多余限制数量
            }
            $("input[name='goods_num']").val(num2);
            $('.goodsfee').html("￥" + (num2 * shop_price).toFixed(2) + "元");
        }
    </script>
</body>
</html>